package cn.always.xiajia.framework.mybatis.core.param;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = false) // 比较对象
@NoArgsConstructor
public class FeignParam<T> implements Serializable {

	private static final long serialVersionUID = -7076311851078548033L;

	private Page<T> page;

	protected T model;

	protected List<T> models;

	// 查询参数
	protected Map<String, Object> params = new HashMap<>();

	// 其他参数
	protected Map<String, Object> extra;

	public FeignParam(Map<String, Object> params) {
		this.params = params;
	}

	public FeignParam(Page<T> page, Map<String, Object> params) {
		this.page = page;
		this.params = params;
	}

}
